The present invention relates to a Class-D amplifier mainly used for power amplification of an audio signal and in particular to a triangular wave generating circuit used to convert an analog audio signal to a pulse signal.
FIG. 6 is a block diagram showing an exemplary configuration of a Class-D amplifier. In this figure, a numeral 101 represents an analog signal input terminal, 102 a triangular wave generating circuit, 103 an integrator, 104 a voltage comparator for comparing the output of the integrator 103 with the output of the triangular wave generating circuit 102, 105 a pulse amplifier, 106, 106xe2x80x2 switching elements controlled to turn ON/OFF by the output of the pulse amplifier 105, and 109, 109xe2x80x2 positive and negative power sources. A numeral 110 represents a resistor for feeding back a PWM signal obtained at the junction of the switching elements 106 and 106xe2x80x2 to the integrator 103. The resistor 110 and a resistor 111 determine the feedback amount. A capacitor 112 is a DC cutoff capacitor. A numeral 107 represents an LPF (low-pass filter) and 108 represents a load.
FIG. 7 is a waveform diagram showing the waveform of each section of FIG. 6. FIG. 7A shows the waveform of the output S1 of the triangular wave generating circuit 102, FIG. 7B the waveform of an analog signal S2 input to the input terminal 101, FIG. 7C the waveform of a signal (PWM signal) on the non-inverted output terminal of the voltage comparator circuit 104, FIG. 7D the waveform of an output signal S4 of the LPF 107. FIG. 8 is a waveform diagram showing the waveforms of the output S1 of the triangular wave generating circuit 102, signals at the output terminals R1, R2 of the voltage comparator 104, and a signal at the junction Q of the switching elements 106, 106xe2x80x2. In FIG. 8, a sign P represents the output of the integrator 103 and a sign Pxe2x80x2 an ideal waveform of the output of the integrator 103.
As shown in these figures, the analog input signal S2 is supplied to the voltage comparator via the integrator 103. The signal is compared with the output S1 of the triangular wave generating circuit 101 and converted to a PWM-modulated pulse signal in the voltage comparator 104 (see FIG. 8B and FIG. 8C). Then, the signal is amplified by the pulse amplifier 105 and switching-amplified by the switching elements 106, 106xe2x80x2. The switching-amplified signal is turned into the analog signal S4 by the LPF 107 and output to the load 108.
FIG. 9 is a circuit diagram showing the details of the Class-D amplifier shown in FIG. 6. The integrator 103 comprises an operational amplifier 121 and a capacitor inserted between the non-inverted input terminal and the output terminal of the operational amplifier 121. The LPF 107 comprises a coil 124 and a capacitor 125.
In the Class-D amplifier, the precision of a triangular wave generated in the triangular wave generating circuit 103 has a great effect on the distortion of amplification. Thus, it is quite important to generate a high-precision triangular wave with negligible variations in the peak value and a negligible offset deviation.
FIG. 10 is a circuit diagram showing an exemplary configuration of a related art triangular wave generating circuit. In FIG. 10, a numeral 1 represents an input terminal where a clock pulse of a duty ratio of 50 percent is input, 2 an amplifier, 3 a resistor, 4 an operational amplifier, 5 a capacitor, and 6 an output terminal. In this circuit, when a pulse input to the input terminal goes high and low alternately, recharging/discharging of the capacitor 5 takes place accordingly, and an output voltage Vout changes in a shape of a triangle.
FIG. 11 is a circuit diagram showing another exemplary configuration of a related art triangular wave generating circuit. In FIG. 11, numerals 1, 2, 4 through 6 are same as those in FIG. 10. Numerals 11, 12 represent switch elements controlled to turn ON/OFF by the output of the amplifier 2. Numerals 13, 14 represent are respectively constant-current circuits. In this circuit, when the switch element 11 is turned ON and the switch element 12 is turned OFF, the capacitor 5 is recharged by a current I1. When the switch element 11 is turned OFF and the switch element 12 is turned ON, the capacitor 5 is recharged in a direction opposite to the above direction by a current I2. This operation is repeated to cause the output voltage Vout to be changed in a shape of a triangle.
In the circuit of FIG. 10, the output voltage Vout is obtained using the following expressions:
Q=CV (Q: electric charge of the capacitor 5; C: capacitance of the capacitor 5; V: voltage of the capacitor 5)
it=CVout (i: current flowing in the capacitor 5)
Vout=it/C=(RVin)/C (R: value of the resistor 3; Vin: input voltage)
As understood from the calculation, the output voltage Vout depends on the value R of the resistor 3, the capacitance C of the capacitor 5 and the amplitude and frequency of the input clock pulse. In general, the value R of the resistor 3 and the capacitance C of the capacitor 5 are varied so that the peak value of the output voltage Vout does not stay constant.
In the circuit shown in FIG. 11, an offset is generated on the output voltage Vout by a slight deviation of the duty ratio of the input clock pulse and the current value of the constant-current circuits 13, 14, as shown in FIG. 12B. FIG. 12A shows a triangular wave free from an offset deviation.
The invention has been proposed under such circumstances and aims at providing a triangular wave generating circuit used in a Class-D amplifier which can generate a high-precision triangular wave free from variations in the peak value or offset deviation.
In order to solve the aforesaid object, the invention is characterized by having the following arrangement.
(1) A triangular wave generating circuit used in a Class-D amplifier, comprising:
an integrating unit including an amplifier and a capacitor inserted between the input terminal and output terminal of the amplifier;
a first constant-current unit which recharges the capacitor so that the output of the amplifier approaches a first predetermined voltage;
a second constant-current unit which recharges the capacitor so that the output of the amplifier approaches a second predetermined voltage;
a current setting unit which sets currents of the first and second constant-current units;
a first switch unit which makes ON/OFF control of the current flowing in the first constant-current unit;
a second switch unit which makes ON/OFF control of the current flowing in the second constant-current unit;
a first comparing unit which compares the output of the amplifier with the first predetermined voltage and outputs a signal when the output of the amplifier coincides with the first predetermined voltage;
a second comparing unit which compares the output of the amplifier with the second predetermined voltage and outputs a signal when the output of the amplifier coincides with the second predetermined voltage; and
a flip-flop whose output signal is inverted depending on the output of the first and second comparing unit, the flip-flop making ON/OFF control of the first and second switch units.
(2) The triangular wave generating circuit according to (1), wherein the current setting unit includes:
a phase comparing unit which compares the phase of an externally supplied clock pulse with the phase of the output of the flip-flop,
a low-pass filter for removing the high-frequency component of the output of the phase comparing unit, and
a current control unit which controls the currents of the first and second constant-current unit.
(3) A triangular wave generating circuit used in a Class-D amplifier, comprising:
an integrating unit including an amplifier and a capacitor inserted between the input terminal and output terminal of the amplifier;
a first current mirror circuit which recharges the capacitor so that the output of the amplifier approaches a first predetermined voltage;
a second current mirror circuit which recharges the capacitor so that the output of the amplifier approaches a second predetermined voltage;
a first switch unit which makes ON/OFF control of the current flowing in the first current mirror circuit;
a second switch unit which makes ON/OFF control of the current flowing in the current mirror circuit;
a first comparing unit which compares the output of the amplifier with the first predetermined voltage and outputs a signal when the output of the amplifier coincides with the first predetermined voltage;
a second comparing unit which compares the output of the amplifier with the second predetermined voltage and outputs a signal when the output of the amplifier coincides with the second predetermined voltage;
a flip-flop whose output signal is inverted depending on the output of the first and second comparing units, the flip-flop making ON/OFF control of the first and second switch units;
a phase comparing unit which compares the phase of an externally supplied clock pulse with the phase of the output of the flip-flop;
a low-pass filter which removes the high-frequency component of the output of the phase comparing unit, and a current control unit which controls the currents of the first and second current mirror circuits.
(4) A Class-D amplifier comprising:
a modulation stage which PWM-modulates an input signal by using a triangular wave output from a triangular wave generating circuit; and
a switching amplification stage which makes switching amplification of the output of the modulation stage by using a switching element,
wherein the triangular wave generating circuit includes,
a voltage divider circuit for dividing the positive source voltage and negative source voltage of the switching amplification stage at a predetermined division ratio respectively and outputting the resulting voltages as a first voltage and a second voltage,
an integrating unit including an amplifier and a capacitor inserted between the input terminal and output terminal of the amplifier,
a first constant-current unit which recharges the capacitor so that the output of the amplifier approaches a first predetermined voltage,
a second constant-current unit which recharges the capacitor so that the output of the amplifier approaches a second predetermined voltage,
a current setting unit which sets currents of the first and second constant-current units,
a first switch unit which makes ON/OFF control of the current flowing in the first constant-current units,
a second switch unit which makes ON/OFF control of the current flowing in the second constant-current unit,
a first comparing unit which compares the output of the amplifier with the first predetermined voltage and outputs a signal when the output of the amplifier coincides with the first predetermined voltage,
a second comparing unit which compares the output of the amplifier with the second predetermined voltage and outputs a signal when the output of the amplifier coincides with the second predetermined voltage, and
a flip-flop whose output signal is inverted depending on the output of the first and second comparing units, the flip-flop making ON/OFF control of the first and second switch units.